package Web.controller;

import Web.annotation.mySystemlog;
import Web.domain.ResponseResult;
import Web.service.UploadBGService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadBGController {

    @Autowired
    //UploadService是我们在huanf-framework写的接口
    private UploadBGService UploadBGService;

    @PostMapping("/uploadBG")
    @mySystemlog(xxbusinessName = "上传背景")
    //MultipartFile是spring提供的接口，ResponseResult是我们在huanf-framework写的实体类
    public ResponseResult uploadImg(MultipartFile img){
        //图片上传到七牛云
        return UploadBGService.uploadBGImg(img);
    }
}